<?php:
class menu1
{
    private $title = "";
    private $prompt = "";
    private $quitmes = "";
    private $myshow = null;
    private $handle = null;
    private $my_data = null;
    private $quit = TRUE;
    private $itemNum = 0;
    private $item = array();

    public function __construct($arg = array())
    {
        if (isset($arg['title']))
            $this->title = $arg['title'];

        if (isset($arg['prompt'])) {
            if ($arg['prompt'] == "")
                $arg['prompt'] = "请输入";
            $this->prompt = $arg['prompt'];
        }

        if (isset($arg['quitmes']))
            $this->quitmes = $arg['quitmes'];

        if (isset($arg['show']))
            $this->myshow = $arg['show'];

        if (isset($arg['handle']))
            $this->handle = $arg['handle'];

        if (isset($arg['data']))
            $this->my_data = $arg['data'];

        if ($this->myshow != null) {
            if (isset($arg['num']))
                $this->itemNum = $arg['num'];
            else {
                echo "请指定菜单条目个数!\n";
                return;
            }
        }
        else
            $this->itemNum = 0;
    }






}



